home *** CD-ROM | disk | FTP | other *** search
/ Commodore Disk User Volume 4 #3 / Commodore_Disk_User_Vol.4_3_1991_-.d64 / demo ba (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  3KB  |  89 lines

  1. 0 fort=0to20:geta$:next
  2. 10 poke53281,0
  3. 11 poke53280,11
  4. 15 v=53248
  5. 16 ifr=1then sys 49316:goto190
  6. 90 if r=1then190
  7. 100 l=l+1:if l=1thenload"multiplexor",8,1
  8. 110 ifl=2thenload"mc demo",8,1
  9. 111 ifl=3thenload"mover",8,1
  10. 115 fort=0to64:poke255*64+t,170:next
  11. 120 print"[147] to exit press fire button in demo"
  12. 130 print" press fire to continue"
  13. 140 ifpeek(56320)<>111then140
  14. 150 sys 16384+256+256
  15. 160 poke53248+21,0
  16. 170 print"[147]"
  17. 180 ifr=0thenr=1:load"sprites",8,1
  18. 190 fort=0to31step3:poke50240+t,14:next:fort=1to31step3:poke50240+t,10:next
  19. 191 fort=2to31step3:poke50240+t,12:next
  20. 192 poke53280,12:poke53281,0
  21. 195 v=53248:sys49316
  22. 196 poke16383,0
  23. 201 fort=0to31:poke50272+t,213+t:next
  24. 210 y=50:fort=0to3:ford=0to7:poke50176+d+t*8,30+d*24:poke50208+t*8+d,y:next
  25. 220 y=y+60:next
  26. 225 fort=0to31:poke50304+t,8:next
  27. 226 pokev+37,1:pokev+38,6
  28. 230 sys50688
  29. 240 fort=24to31:poke50208+t,255:poke50176+t,peek(50176+t)+50:next
  30. 250 remfort=8to31:poke50208+t,0:next
  31. 260 sys50688
  32. 261 goto618
  33. 270 x=0:y=0:sp=8:t=1:z$="   [157][157][157]   [157][157][157]   "
  34. 280 print" sprite x=    [157][157][157][157]";peek(50176+sp)
  35. 290 print" sprite y=    [157][157][157][157]";peek(50176+32+sp)
  36. 300 print" spr what=    [157][157][157][157]";peek(50176+96+sp)
  37. 310 print" spr col =    [157][157][157][157]";peek(50176+64+sp)
  38. 320 print" spr num =    [157][157][157][157]";sp
  39. 321 print" step    =    [157][157][157][157]";s
  40. 330 geta$:ifa$=""then600
  41. 340 ifa$="+"thensp=sp+1:ifsp>24thensp=0
  42. 350 ifa$="-"thensp=sp-1:ifsp<0thensp=24
  43. 360 s=s+(a$="[138]")-(a$="[134]"):ifs<0thens=16
  44. 370 ifs>16thens=0
  45. 380 ifa$="o"thenpoke50176+sp+32,0
  46. 500 x=peek(50176+sp):y=peek(50176+sp+32)
  47. 510 x=x+((a$="z")*s)-((a$="x")*s)
  48. 520 y=y+((a$=";")*s)-((a$="/")*s)
  49. 530 ifx<0thenx=255
  50. 540 ifx>255thenx=0
  51. 545 ify=0then560
  52. 550 ify<30theny=255
  53. 560 ify>255theny=30
  54. 570 poke50176+sp,x:poke50176+sp+32,y
  55. 600 c=peek(50176+sp+64):poke50176+sp+64,c+1:sys50688:poke50176+sp+64,c
  56. 610 sys50688:goto280
  57. 618 data54, 78, 0, 0, 0, 0, 0, 38, 62, 86, 110, 102, 102, 126,126,150,130,154,106
  58. 619 data130, 0, 129, 174, 134, 80, 104, 128, 152, 176, 200, 224, 248
  59. 620 data84, 83, 32, 30, 30, 30, 0, 158, 211, 211,212,80,101,101,122, 122, 170, 170
  60. 630 data191, 191, 220, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255
  61. 635 restore
  62. 640 fort=0to31:readf:poke50176+t,f:next
  63. 649 print"[147][151]     press any key to load the menu     "
  64. 650 fort=32to63:readf:poke50176+t,f:next:sys50688:d=-1
  65. 651 poke830,1
  66. 652 z=49312:x=49152+32:goto1000
  67. 655 sys820:geta$:ifa$<>""then660
  68. 656 next:d=-d:ifd=1thenpoke830,253:goto652
  69. 657 goto651
  70. 660 print"[147][151]     press any key to load the menu     "
  71. 661 poke830,254:poke823,0:poke832,0:fort=0to300
  72. 662 sys820:next
  73. 680 poke53248+21,0
  74. 690 s$="menu":load"rtu",8,1
  75. 1000 d=2:n=48:poke823,0:poke832,0
  76. 1001 fora=1to20:v=rnd(1)*40:w=int(rnd(1)*23)+1:poke1024+v+w*40,46
  77. 1002 poke55296+v+w*40,rnd(1)*15:next
  78. 1003 print"[155]a demo to show what can be done in basic"
  79. 1004 goto1040
  80. 1010 fort=0ton
  81. 1020 sys820:pokez+2,peek(x+16):pokez+1,peek(x+8):pokez,peek(x)
  82. 1021 ifpeek(197)<>64then661
  83. 1030 next:d=d+1:ifd>4thend=1
  84. 1040 ifd=4thenpoke830,253:n=49:poke823,0:poke832,0:goto1010
  85. 1050 ifd=2thenpoke830,1:n=49:poke823,0:poke832,0:goto1010
  86. 1060 ifd=3thenpoke823,32:poke832,32:poke830,253:n=13:goto1010
  87. 1070 ifd=1thenpoke823,32:poke832,32:poke830,1:n=13:goto1010
  88. 1080 goto1010
  89.